
import static org.junit.Assert.*;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;

public class TestContrat {
	
	private Contrat contrat1;
	private Contrat contrat2;

    /**
     * Default constructor for test class TestEmplyee
     */
    public TestContrat()
    {
    }

    /**
     * Sets up the test fixture.
     *
     * Called before every test case method.
     */
    @Before
    public void setUp()
    {
    	contrat1 = new Contrat("CDD");
    	contrat2 = new Contrat("CDI");
       
    }

    /**
     * Tears down the test fixture.
     *
     * Called after every test case method.
     */
    @After
    public void tearDown()
    {
    }

    @Test
    public void testPosSalaireContrat(){
    	contrat1.setSalaire(200);
    	 assertEquals(200, contrat1.getSalaire());
    }
    
    @Test
    public void testNegSalaireContrat(){
    	contrat1.setSalaire(-200);
    	 assertEquals(100, contrat1.getSalaire());
    }
    
    @Test
    public void testPeriodeContrat(){
    	contrat1.setFin(10);
    	contrat1.setDebut(12);
    	 assertEquals(1, contrat1.getDebut());
    }
    
    @Test
    public void testTypeContrat(){
    	contrat1.setType("interime");
    	assertEquals("CDD", contrat1.getType());
    }
    

}
